Both :icon-name and :gicon are propagated to the internal QuickToggle
with property bindings. However the bindings are set up in the wrong
order:
:icon-name is a convenience property to set :gicon to a ThemedIcon
of the given name. That means binding :icon-name first will correctly
set the underlying StIcon's :gicon, but then the :gicon binding will
set it again to null.
Fix this by swapping the order in which the bindings are set up,
so that it works for both properties.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6542
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2726>
this.bind_property('subtitle',
contents, 'subtitle',
GObject.BindingFlags.SYNC_CREATE);
- this.bind_property('icon-name',
- contents, 'icon-name',
- GObject.BindingFlags.SYNC_CREATE);
this.bind_property('gicon',
contents, 'gicon',
GObject.BindingFlags.SYNC_CREATE);
+ this.bind_property('icon-name',
+ contents, 'icon-name',
+ GObject.BindingFlags.SYNC_CREATE);
this.bind_property('menu-enabled',
this._menuButton, 'visible',